class RhelpersController < ApplicationController
  # GET /rhelpers
  # GET /rhelpers.xml
  def index
    @rhelpers = Rhelper.find(:all)

    respond_to do |format|
      format.html # index.rhtml
      format.xml  { render :xml => @rhelpers.to_xml }
    end
  end

  # GET /rhelpers/1
  # GET /rhelpers/1.xml
  def show
    @rhelper = Rhelper.find(params[:id])

    respond_to do |format|
      format.html # show.rhtml
      format.xml  { render :xml => @rhelper.to_xml }
    end
  end

  # GET /rhelpers/new
  def new
    @rhelper = Rhelper.new
  end

  # GET /rhelpers/1;edit
  def edit
    @rhelper = Rhelper.find(params[:id])
  end

  # POST /rhelpers
  # POST /rhelpers.xml
  def create
    @rhelper = Rhelper.new(params[:rhelper])

    respond_to do |format|
      if @rhelper.save
        flash[:notice] = 'Rhelper was successfully created.'
        format.html { redirect_to rhelper_url(@rhelper) }
        format.xml  { head :created, :location => rhelper_url(@rhelper) }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @rhelper.errors.to_xml }
      end
    end
  end

  # PUT /rhelpers/1
  # PUT /rhelpers/1.xml
  def update
    @rhelper = Rhelper.find(params[:id])

    respond_to do |format|
      if @rhelper.update_attributes(params[:rhelper])
        flash[:notice] = 'Rhelper was successfully updated.'
        format.html { redirect_to rhelper_url(@rhelper) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @rhelper.errors.to_xml }
      end
    end
  end

  # DELETE /rhelpers/1
  # DELETE /rhelpers/1.xml
  def destroy
    @rhelper = Rhelper.find(params[:id])
    @rhelper.destroy

    respond_to do |format|
      format.html { redirect_to rhelpers_url }
      format.xml  { head :ok }
    end
  end
end
